package com.cwl.pattern.观察者模式;

/**
 * @program: pattern
 * @description:
 * @author: ChenWenLong
 * @create: 2019-07-09 16:48
 **/
public class ObserverPattern {

    public static void main(String[] args) {
        Subject subject=new ConcreteSubject();
        Observer obs1=new ConcreteObserverA();
        Observer obs2=new ConcreteObserverB();
        subject.add(obs1);
        subject.add(obs2);
        subject.notifyObserver();
    }
}
